{% extends "base_en.html" %}
{% block content %}
<script type="text/javascript" src="/static/javascripts/xms_en.js"></script>
    Not paid: <ins style="color:red;">
        {{ notpay.count }} items</ins>
    <br/>
    <table class="datalist" cellpadding="2" cellspacing="0">
    <tr><td>    
    {% for item in notpay.sum %}
     {{item.0|escape}} : {{item.1|floatformat:2}} 
    {% endfor %}
    </td></tr>
    </table>
    {% include 'pager_en.html' %}
    <form method="post" action="/notpay/"  onsubmit="return verifyListForm('ispay')" >
    <table class="datalist" cellpadding="2" cellspacing="0">
    <tr>
      <th style="width:120px;"><span>Date</span></th>
      <th style="width:60px;"><span>Money</span></th>
      <th style="width:100px;"><span>Name</span></th>
      <th><span>Description</span></th>
      <th style="width:80px;"><span>Submitter</span></th>
      <th style="width:100px;">
      {% if isAdmin %}
      <input onclick="selectAll('ispay')" id="selectall" type="checkbox"/>Select All?
      {% endif %}
      </th>
    </tr>
    {% for item in notpay.list %}
    <tr class={%if forloop.counter0|divisibleby:2 %}"alternation"{%else%}"seperation"{%endif%} >
      <td>{{item.Datetime|date:"Y-m-d" }}</td>
      <td>{{item.Money|floatformat:2}}</td>
      <td><span>{{item.User.NickName|escape}}</span></td>
      <td><span>{{item.Details|escape}}</span></td>
      <td>{{item.Submiter.NickName|escape}}</td>
      <td>
      {% if isAdmin %}
      <input onmouseover="onCheckBoxMoseOver(event,'{{item.key}}')" name="ispay" id="{{item.key}}" type="checkbox" value="{{item.key}}"/>
      {% endif %}
      </td>
    </tr>
    {% endfor %}
    {% if notpay.list %}
    {% if isAdmin %}
    <tr><td colspan="5" align="center"><input class="MyButton" type="submit" value="Pay Slected"/></td></tr>
    {% endif %}
    {% endif %}
    </table>
   </form>
{% endblock %}
